4d5b38c4c3a94ad99c42eff7b758519e5b042ad6,findbugs/src/java/edu/umd/cs/findbugs/detect/FindLocalSelfAssignment2.java,FindLocalSelfAssignment2,sawOpcode,#number#,48
Before Change
if (isRegisterStore() && previousLoadOf == getRegisterOperand() && gotoCount < 2 && getPC() != previousGotoTarget)
bugReporter.reportBug(
new BugInstance(this,
"SA_LOCAL_SELF_ASSIGNMENT", getMethodName().equals("<init>") ? HIGH_PRIORITY : NORMAL_PRIORITY)
.addClassAndMethod(this)
.add(LocalVariableAnnotation.getLocalVariableAnnotation(getMethod(), getRegisterOperand(), getPC(), getPC()))
.addSourceLine(this));
After Change
if (isRegisterStore()) {
if (previousLoadOf == getRegisterOperand() && gotoCount < 2 && getPC() != previousGotoTarget) {
int priority = NORMAL_PRIORITY;
String methodName = getMethodName();
if (methodName.equals("<init>") || methodName.startsWith("set") && getCode().getCode().length <= 5 ||
!previousStores.get(getRegisterOperand())) priority = HIGH_PRIORITY;
bugReporter.reportBug(